from utils.abstract_repository import AbstractRepository
from utils.models.state import State


class StateRepository(AbstractRepository[State]):
    model = State

    async def add_cash(self, state_id: int, amount: int) -> None:
        await self.edit_by_id(state_id, cash=self.model.cash+amount)
        return
